# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
pkgname=plasma-activities
pkgver=6.0.4
pkgrel=0
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
pkgdesc="Core components for the KDE's Activities"
url="https://invent.kde.org/plasma/plasma-activities.git"
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND (LGPL-2.1-only OR LGPL-3.0-only)"
depends="qt6-qtbase-sqlite"
depends_dev="
	kconfig-dev
	kcoreaddons-dev
	kwindowsystem-dev
	qt6-qtdeclarative-dev
	"
makedepends="$depends_dev
	boost-dev
	doxygen
	extra-cmake-modules
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-libs $pkgname-doc"
_repo_url="https://invent.kde.org/plasma/plasma-activities.git"
source="https://download.kde.org/stable/plasma/$pkgver/plasma-activities-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e9f6cc4fdd0b64860218091a8112cedd8d0c22e767bcb4939100ea2f64e5aefc05150e822204090be333d2d9bba70b7bcc56d217b00fde000647f7ffb53078ad  plasma-activities-6.0.4.tar.xz
"
